<extend name="Public/base" />

<block name="body">
	<!-- 标题栏 -->
	<div class="am-cf am-u-md-12 header-title">
		<h2>{$title}内容列表</h2>
	</div>

	<!-- 数据列表 -->
	<div class="am-cf am-u-md-12 am-margin-top">
		<a href="{:U('addons/execute',array('_addons'=>'Diyform','_controller'=>'AdminDiyform','_action'=>'addform'))}"><button type="button" class="am-btn am-btn-primary">创建表单</button></a>
		<empty name="custom_adminlist">
			<!-- 数据列表 -->
	        <table class="am-table am-table-striped">
				<thead>
					<tr>
						<th>
						 	<input class="check-all" type="checkbox">
	                    </th>
						<volist name="list_grid" id="vo">
							<th>{$vo['title']}</th>
						</volist>
					</tr>
				</thead>
				<tbody>
					<volist name="_list" id="lv" key="vo">
					<tr>
						<td><input class="ids" type="checkbox" value="{$lv.id}" name="id[]"></td>
						<volist name="list_grid" id="lk">
							<if condition="$lk['title'] eq '操作'">
								<td>
									<volist name="lk['href']" id="link">
										<a href="{$link[0]}{$lv.id}">{$link[1]}</a>&nbsp;
									</volist>
								</td>
							<else />
								<td>
									<if condition="$lk['field'][0] eq 'create_time'">
										{$lv[$lk['field'][0]]|time_format}
									<else />
										{$lv[$lk['field'][0]]}
									</if>
								</td>
							</if>
						</volist>
					</tr>
					</volist>
				</tbody>
			</table>
		<else />
			<present name="custom_adminlist">
				{$custom_adminlist}
			</present>
		</empty>
	</div>
	<!-- 分页 -->
    <div class="page" style="clear: both;padding: 10px 0;">
        {$_page}
    </div>
</block>
<block name="script">
	<script type="text/javascript">
		$(function(){
	        //全选节点
	        $('.check-all').on('change',function(){
	            $('.ids').prop('checked',this.checked);
	        });
		})
	</script>
</block>
